package org.edu.modules.oa.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.edu.modules.oa.entity.SysDictItemEntity;
import org.edu.modules.oa.entity.VeOaCarInfoEntity;
import org.edu.modules.oa.entity.VeOaSysDictEntity;
import org.edu.modules.oa.mapper.ISysDictItemMapper;
import org.edu.modules.oa.mapper.IVeOaSysDictMapper;
import org.edu.modules.oa.service.IVeSysDictService;
import org.edu.modules.oa.vo.VeOaCarSetVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@Service//备注，扫包的时候自动加载

public class VeSysDictServiceImpI  implements IVeSysDictService {
    @Resource
    private ISysDictItemMapper iSysDictItemMapper;
    @Override
    public SysDictItemEntity queryDictName(String dictName) {
        // 查找该字典的ID
        QueryWrapper<SysDictItemEntity> tableWrapper = new QueryWrapper<>();
        tableWrapper.eq("item_text",dictName);
        return   iSysDictItemMapper.selectOne(tableWrapper);
    }

    @Override
    public List<SysDictItemEntity> categorynameBox() {
        // 获取所有分类名称
        QueryWrapper<SysDictItemEntity> tableWrapper = new QueryWrapper<>();
        tableWrapper.like("dict_id","1386164086873776129");
        return   iSysDictItemMapper.selectList(tableWrapper) ;
    }

}
